//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/.
// 			VisualNovelToolkit		     /_/_/_/_/_/_/_/_/_/.
// Copyright ©2013 - Sol-tribe.	/_/_/_/_/_/_/_/_/_/.
//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace ViNoToolkit{

	/// <summary>
	/// Scene Library.
	/// </summary>	
	public class SceneLibrary : MonoBehaviour {
		public Scene[] sceneEntries;

		/// <summary>
		/// If Not Found , return null.
		/// </summary>
		public Scene GetSceneBy( string key ){
			foreach( Scene scene in sceneEntries){
				if( scene.name == key ){
					return scene;
				}				
			}
			return null;
		}

		/// <summary>
		/// Get Scene Name List.
		/// </summary>
		public string[] GetSceneNameList(){
			List<string> sceneList = new List<string>();
			for(int i=0;i<sceneEntries.Length;i++){
				sceneList.Add( sceneEntries[ i ].name );
			}
			return sceneList.ToArray();
		}

	}

}